<template>
	<sl-loading loadingdata="加载中..."></sl-loading>
</template>

<script>
	import StoreApi from '@/api/store/store.js';
	import ApplyCode from '@/utils/store/applyCode.js';
	//
	export default {
		//
		name: 'transition',
		//
		data() {
			return {
				//
				code: '',
			};
		},
		//
		onLoad(options) {
			//
			this.checkStore();
		},
		onShow() {},
		//
		methods: {
			checkStore: async function() {
				//这里不应该查询，给个标识就行
				let res = await StoreApi.query();
				console.log('res: --------------------------- ', res);
				this.code = "13";
				let url = '';
				let name = ''
				let isEnd = true;
				// if (this.code == 1) {
				// 	url = ApplyCode.getValueByKey(this.code.toString() + res.obj.audits);
				// 	name = ApplyCode.getNameByKey(this.code.toString() + res.obj.audits);
				// 	if (res.obj.audits == 4) {
				// 		name = res.obj.auditRemarks;
				// 		isEnd = true;
				// 	}
				// } else {
				url = ApplyCode.getValueByKey(this.code.toString());
				name = ApplyCode.getNameByKey(this.code.toString());
				isEnd = false;
				// }
				this.$app.navTo(url, {
					name,
					isEnd
				})
			},
		}
	};
</script>

<style lang="scss" scoped>

</style>